\(\int \frac {1}{\sqrt {g \sin (e+f x)} \sqrt {a+a \sin (e+f x)} (c-c \sin (e+f x))} \, dx\) [18]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [F]
   Giac [F(-1)]
   Mupad [F(-1)]

Optimal result

Integrand size = 40, antiderivative size = 118 \[ \int \frac {1}{\sqrt {g \sin (e+f x)} \sqrt {a+a \sin (e+f x)} (c-c \sin (e+f x))} \, dx=-\frac {\arctan \left (\frac {\sqrt {a} \sqrt {g} \cos (e+f x)}{\sqrt {2} \sqrt {g \sin (e+f x)} \sqrt {a+a \sin (e+f x)}}\right )}{\sqrt {2} \sqrt {a} c f \sqrt {g}}+\frac {\sec (e+f x) \sqrt {g \sin (e+f x)} \sqrt {a+a \sin (e+f x)}}{a c f g} \]

[Out]

-1/2*arctan(1/2*cos(f*x+e)*a^(1/2)*g^(1/2)*2^(1/2)/(g*sin(f*x+e))^(1/2)/(a+a*sin(f*x+e))^(1/2))/c/f*2^(1/2)/a^
(1/2)/g^(1/2)+sec(f*x+e)*(g*sin(f*x+e))^(1/2)*(a+a*sin(f*x+e))^(1/2)/a/c/f/g

Rubi [A] (verified)

Time = 0.34 (sec) , antiderivative size = 118, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.150, Rules used = {3017, 2861, 211, 3009, 12, 30} \[ \int \frac {1}{\sqrt {g \sin (e+f x)} \sqrt {a+a \sin (e+f x)} (c-c \sin (e+f x))} \, dx=\frac {\sec (e+f x) \sqrt {a \sin (e+f x)+a} \sqrt {g \sin (e+f x)}}{a c f g}-\frac {\arctan \left (\frac {\sqrt {a} \sqrt {g} \cos (e+f x)}{\sqrt {2} \sqrt {a \sin (e+f x)+a} \sqrt {g \sin (e+f x)}}\right )}{\sqrt {2} \sqrt {a} c f \sqrt {g}} \]

[In]

Int[1/(Sqrt[g*Sin[e + f*x]]*Sqrt[a + a*Sin[e + f*x]]*(c - c*Sin[e + f*x])),x]

[Out]

-(ArcTan[(Sqrt[a]*Sqrt[g]*Cos[e + f*x])/(Sqrt[2]*Sqrt[g*Sin[e + f*x]]*Sqrt[a + a*Sin[e + f*x]])]/(Sqrt[2]*Sqrt
[a]*c*f*Sqrt[g])) + (Sec[e + f*x]*Sqrt[g*Sin[e + f*x]]*Sqrt[a + a*Sin[e + f*x]])/(a*c*f*g)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 211

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/Rt[a/b, 2]], x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 2861

Int[1/(Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]*Sqrt[(c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]]), x_Symbol] :> D
ist[-2*(a/f), Subst[Int[1/(2*b^2 - (a*c - b*d)*x^2), x], x, b*(Cos[e + f*x]/(Sqrt[a + b*Sin[e + f*x]]*Sqrt[c +
 d*Sin[e + f*x]]))], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 -
 d^2, 0]

Rule 3009

Int[Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]/(Sqrt[(g_.)*sin[(e_.) + (f_.)*(x_)]]*((c_) + (d_.)*sin[(e_.) +
(f_.)*(x_)])), x_Symbol] :> Dist[-2*(b/f), Subst[Int[1/(b*c + a*d + c*g*x^2), x], x, b*(Cos[e + f*x]/(Sqrt[g*S
in[e + f*x]]*Sqrt[a + b*Sin[e + f*x]]))], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && NeQ[b*c - a*d, 0] && EqQ[a^
2 - b^2, 0]

Rule 3017

Int[1/(Sqrt[(g_.)*sin[(e_.) + (f_.)*(x_)]]*Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]*((c_) + (d_.)*sin[(e_.)
+ (f_.)*(x_)])), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(Sqrt[g*Sin[e + f*x]]*Sqrt[a + b*Sin[e + f*x]]), x], x
] - Dist[d/(b*c - a*d), Int[Sqrt[a + b*Sin[e + f*x]]/(Sqrt[g*Sin[e + f*x]]*(c + d*Sin[e + f*x])), x], x] /; Fr
eeQ[{a, b, c, d, e, f, g}, x] && NeQ[b*c - a*d, 0] && (EqQ[a^2 - b^2, 0] || EqQ[c^2 - d^2, 0])

Rubi steps \begin{align*} \text {integral}& = \frac {\int \frac {\sqrt {a+a \sin (e+f x)}}{\sqrt {g \sin (e+f x)} (c-c \sin (e+f x))} \, dx}{2 a}+\frac {\int \frac {1}{\sqrt {g \sin (e+f x)} \sqrt {a+a \sin (e+f x)}} \, dx}{2 c} \\ & = -\frac {\text {Subst}\left (\int \frac {1}{c g x^2} \, dx,x,\frac {a \cos (e+f x)}{\sqrt {g \sin (e+f x)} \sqrt {a+a \sin (e+f x)}}\right )}{f}-\frac {a \text {Subst}\left (\int \frac {1}{2 a^2+a g x^2} \, dx,x,\frac {a \cos (e+f x)}{\sqrt {g \sin (e+f x)} \sqrt {a+a \sin (e+f x)}}\right )}{c f} \\ & = -\frac {\arctan \left (\frac {\sqrt {a} \sqrt {g} \cos (e+f x)}{\sqrt {2} \sqrt {g \sin (e+f x)} \sqrt {a+a \sin (e+f x)}}\right )}{\sqrt {2} \sqrt {a} c f \sqrt {g}}-\frac {\text {Subst}\left (\int \frac {1}{x^2} \, dx,x,\frac {a \cos (e+f x)}{\sqrt {g \sin (e+f x)} \sqrt {a+a \sin (e+f x)}}\right )}{c f g} \\ & = -\frac {\arctan \left (\frac {\sqrt {a} \sqrt {g} \cos (e+f x)}{\sqrt {2} \sqrt {g \sin (e+f x)} \sqrt {a+a \sin (e+f x)}}\right )}{\sqrt {2} \sqrt {a} c f \sqrt {g}}+\frac {\sec (e+f x) \sqrt {g \sin (e+f x)} \sqrt {a+a \sin (e+f x)}}{a c f g} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.18 (sec) , antiderivative size = 132, normalized size of antiderivative = 1.12 \[ \int \frac {1}{\sqrt {g \sin (e+f x)} \sqrt {a+a \sin (e+f x)} (c-c \sin (e+f x))} \, dx=\frac {\csc (2 (e+f x)) \sin ^{\frac {3}{2}}(e+f x) \sqrt {a (1+\sin (e+f x))} \left (2 \sqrt {c} \sqrt {\sin (e+f x)}+\sqrt {2} \arctan \left (\frac {\sqrt {2} \sqrt {c} \sqrt {\sin (e+f x)}}{\sqrt {c-c \sin (e+f x)}}\right ) \sqrt {c-c \sin (e+f x)}\right )}{a c^{3/2} f \sqrt {g \sin (e+f x)}} \]

[In]

Integrate[1/(Sqrt[g*Sin[e + f*x]]*Sqrt[a + a*Sin[e + f*x]]*(c - c*Sin[e + f*x])),x]

[Out]

(Csc[2*(e + f*x)]*Sin[e + f*x]^(3/2)*Sqrt[a*(1 + Sin[e + f*x])]*(2*Sqrt[c]*Sqrt[Sin[e + f*x]] + Sqrt[2]*ArcTan
[(Sqrt[2]*Sqrt[c]*Sqrt[Sin[e + f*x]])/Sqrt[c - c*Sin[e + f*x]]]*Sqrt[c - c*Sin[e + f*x]]))/(a*c^(3/2)*f*Sqrt[g
*Sin[e + f*x]])

Maple [A] (verified)

Time = 3.40 (sec) , antiderivative size = 130, normalized size of antiderivative = 1.10

method result size
default \(-\frac {\left (2 \cos \left (f x +e \right ) \sqrt {\csc \left (f x +e \right )-\cot \left (f x +e \right )}\, \arctan \left (\sqrt {\csc \left (f x +e \right )-\cot \left (f x +e \right )}\right )+1-\cos \left (f x +e \right )-\cos \left (f x +e \right ) \cot \left (f x +e \right )+\csc \left (f x +e \right )\right ) \left (1+\cos \left (f x +e \right )\right )}{c f \left (-\cos \left (f x +e \right )+\sin \left (f x +e \right )-1\right ) \sqrt {a \left (1+\sin \left (f x +e \right )\right )}\, \sqrt {g \sin \left (f x +e \right )}}\) \(130\)

[In]

int(1/(c-c*sin(f*x+e))/(g*sin(f*x+e))^(1/2)/(a+a*sin(f*x+e))^(1/2),x,method=_RETURNVERBOSE)

[Out]

-1/c/f*(2*cos(f*x+e)*(csc(f*x+e)-cot(f*x+e))^(1/2)*arctan((csc(f*x+e)-cot(f*x+e))^(1/2))+1-cos(f*x+e)-cos(f*x+
e)*cot(f*x+e)+csc(f*x+e))*(1+cos(f*x+e))/(-cos(f*x+e)+sin(f*x+e)-1)/(a*(1+sin(f*x+e)))^(1/2)/(g*sin(f*x+e))^(1
/2)

Fricas [A] (verification not implemented)

none

Time = 0.37 (sec) , antiderivative size = 391, normalized size of antiderivative = 3.31 \[ \int \frac {1}{\sqrt {g \sin (e+f x)} \sqrt {a+a \sin (e+f x)} (c-c \sin (e+f x))} \, dx=\left [\frac {\sqrt {2} a g \sqrt {-\frac {1}{a g}} \cos \left (f x + e\right ) \log \left (-\frac {4 \, \sqrt {2} {\left (3 \, \cos \left (f x + e\right )^{2} + {\left (3 \, \cos \left (f x + e\right ) + 4\right )} \sin \left (f x + e\right ) - \cos \left (f x + e\right ) - 4\right )} \sqrt {a \sin \left (f x + e\right ) + a} \sqrt {g \sin \left (f x + e\right )} \sqrt {-\frac {1}{a g}} - 17 \, \cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )^{2} - {\left (17 \, \cos \left (f x + e\right )^{2} + 14 \, \cos \left (f x + e\right ) - 4\right )} \sin \left (f x + e\right ) + 18 \, \cos \left (f x + e\right ) + 4}{\cos \left (f x + e\right )^{3} + 3 \, \cos \left (f x + e\right )^{2} + {\left (\cos \left (f x + e\right )^{2} - 2 \, \cos \left (f x + e\right ) - 4\right )} \sin \left (f x + e\right ) - 2 \, \cos \left (f x + e\right ) - 4}\right ) + 8 \, \sqrt {a \sin \left (f x + e\right ) + a} \sqrt {g \sin \left (f x + e\right )}}{8 \, a c f g \cos \left (f x + e\right )}, \frac {\sqrt {2} a g \sqrt {\frac {1}{a g}} \arctan \left (\frac {\sqrt {2} \sqrt {a \sin \left (f x + e\right ) + a} \sqrt {g \sin \left (f x + e\right )} \sqrt {\frac {1}{a g}} {\left (3 \, \sin \left (f x + e\right ) - 1\right )}}{4 \, \cos \left (f x + e\right ) \sin \left (f x + e\right )}\right ) \cos \left (f x + e\right ) + 4 \, \sqrt {a \sin \left (f x + e\right ) + a} \sqrt {g \sin \left (f x + e\right )}}{4 \, a c f g \cos \left (f x + e\right )}\right ] \]

[In]

integrate(1/(c-c*sin(f*x+e))/(g*sin(f*x+e))^(1/2)/(a+a*sin(f*x+e))^(1/2),x, algorithm="fricas")

[Out]

[1/8*(sqrt(2)*a*g*sqrt(-1/(a*g))*cos(f*x + e)*log(-(4*sqrt(2)*(3*cos(f*x + e)^2 + (3*cos(f*x + e) + 4)*sin(f*x
 + e) - cos(f*x + e) - 4)*sqrt(a*sin(f*x + e) + a)*sqrt(g*sin(f*x + e))*sqrt(-1/(a*g)) - 17*cos(f*x + e)^3 - 3
*cos(f*x + e)^2 - (17*cos(f*x + e)^2 + 14*cos(f*x + e) - 4)*sin(f*x + e) + 18*cos(f*x + e) + 4)/(cos(f*x + e)^
3 + 3*cos(f*x + e)^2 + (cos(f*x + e)^2 - 2*cos(f*x + e) - 4)*sin(f*x + e) - 2*cos(f*x + e) - 4)) + 8*sqrt(a*si
n(f*x + e) + a)*sqrt(g*sin(f*x + e)))/(a*c*f*g*cos(f*x + e)), 1/4*(sqrt(2)*a*g*sqrt(1/(a*g))*arctan(1/4*sqrt(2
)*sqrt(a*sin(f*x + e) + a)*sqrt(g*sin(f*x + e))*sqrt(1/(a*g))*(3*sin(f*x + e) - 1)/(cos(f*x + e)*sin(f*x + e))
)*cos(f*x + e) + 4*sqrt(a*sin(f*x + e) + a)*sqrt(g*sin(f*x + e)))/(a*c*f*g*cos(f*x + e))]

Sympy [F]

\[ \int \frac {1}{\sqrt {g \sin (e+f x)} \sqrt {a+a \sin (e+f x)} (c-c \sin (e+f x))} \, dx=- \frac {\int \frac {1}{\sqrt {g \sin {\left (e + f x \right )}} \sqrt {a \sin {\left (e + f x \right )} + a} \sin {\left (e + f x \right )} - \sqrt {g \sin {\left (e + f x \right )}} \sqrt {a \sin {\left (e + f x \right )} + a}}\, dx}{c} \]

[In]

integrate(1/(c-c*sin(f*x+e))/(g*sin(f*x+e))**(1/2)/(a+a*sin(f*x+e))**(1/2),x)

[Out]

-Integral(1/(sqrt(g*sin(e + f*x))*sqrt(a*sin(e + f*x) + a)*sin(e + f*x) - sqrt(g*sin(e + f*x))*sqrt(a*sin(e +
f*x) + a)), x)/c

Maxima [F]

\[ \int \frac {1}{\sqrt {g \sin (e+f x)} \sqrt {a+a \sin (e+f x)} (c-c \sin (e+f x))} \, dx=\int { -\frac {1}{\sqrt {a \sin \left (f x + e\right ) + a} {\left (c \sin \left (f x + e\right ) - c\right )} \sqrt {g \sin \left (f x + e\right )}} \,d x } \]

[In]

integrate(1/(c-c*sin(f*x+e))/(g*sin(f*x+e))^(1/2)/(a+a*sin(f*x+e))^(1/2),x, algorithm="maxima")

[Out]

-integrate(1/(sqrt(a*sin(f*x + e) + a)*(c*sin(f*x + e) - c)*sqrt(g*sin(f*x + e))), x)

Giac [F(-1)]

Timed out. \[ \int \frac {1}{\sqrt {g \sin (e+f x)} \sqrt {a+a \sin (e+f x)} (c-c \sin (e+f x))} \, dx=\text {Timed out} \]

[In]

integrate(1/(c-c*sin(f*x+e))/(g*sin(f*x+e))^(1/2)/(a+a*sin(f*x+e))^(1/2),x, algorithm="giac")

[Out]

Timed out

Mupad [F(-1)]

Timed out. \[ \int \frac {1}{\sqrt {g \sin (e+f x)} \sqrt {a+a \sin (e+f x)} (c-c \sin (e+f x))} \, dx=\int \frac {1}{\sqrt {g\,\sin \left (e+f\,x\right )}\,\sqrt {a+a\,\sin \left (e+f\,x\right )}\,\left (c-c\,\sin \left (e+f\,x\right )\right )} \,d x \]

[In]

int(1/((g*sin(e + f*x))^(1/2)*(a + a*sin(e + f*x))^(1/2)*(c - c*sin(e + f*x))),x)

[Out]

int(1/((g*sin(e + f*x))^(1/2)*(a + a*sin(e + f*x))^(1/2)*(c - c*sin(e + f*x))), x)